/**
 * @Description 怪物类
 * @Author hhy
 * @Date 2020/9/21 15:51
 */
public class Monster {
    private String name;
    private long level;
    private long hp;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public long getLevel() {
        return level;
    }

    //如果传入的是负数或者是0的话，那就强制重置为1
    public void setLevel(long level) {
        if (level<1){
            this.level = 1;
        }else {
            this.level = level;
        }
    }

    public long getHp() {
        return hp;
    }

    public void setHp(long hp) {
        this.hp = hp;
    }
}
